<?php
namespace app\api\controller;
// namespace app\zw_admin\controller;
use \think\Controller;
use think\Db;
// use think\Controller;
use think\Session;
use think\Request;
use Endroid\QrCode\Tests;
use think\Paginator;
use qrcode;
use alisms\SmsDemo;
class RefundController extends Controller
{

	/**
	 * 售后列表
	 */
	public function refundList()
	{
		$uid = input('param.uid');
		$goodsList = db('goods')->where('type','in','5,6')->where(['uid'=>$uid])->select();
		
		// $orderList = [];
		$goodsOrderList = [];
		foreach ($goodsList as $key => $value) {
			$value['goods_img'] = "http://www.mochoushop.com/".$value['goods_img'];
			$goodsOrderList[$key] = $value;
			$orderList = db('goods_order')->where(['number'=>$value['number']])->select();
			foreach ($orderList as $k => $v) {
				$goodsOrderList[$key]['time'] = $v['time'];
			}
		}
		// dump($goodsOrderList);
		// exit;
		if (!empty($goodsList)) {
            echo json_encode(array("status"=>1,'message'=>'请求成功',"data"=>$goodsOrderList));
            exit;
        }else{
            echo json_encode(array("status"=>1,'message'=>'暂无数据',"data"=>[]));
            exit;
        }


	}

}